{% extends 'HuiFrontEndBundle::layout.html.twig' %}

{% block head %}
<script src="{{ asset('bundles/frontend/js/jcarousellite_1.0.1_news.js') }}" type="text/javascript"></script>

<script  type="text/javascript">
        $(function () {
            $(".newsticker-jcarousellite").jCarouselLite({
                vertical: true,
                visible: 2,
                auto: 3000,
                speed: 1000,
                btnNext: ".next",
                btnPrev: ".prev",
                mouseWheel: true

            });
        });

function onAfter(curr, next, opts, fwd){var $ht=$(this).height();$(this).parent().animate({height:$ht})}
</script>

<link href="{{ asset('bundles/frontend/css/style_news.css') }}" rel="stylesheet" type="text/css" />
{% endblock %}

{% block content %}
<section id="content">
        <div class="main">
            <div class="container_24">
                <div class="page1-box2">
                    <div class="grid_8">
                        <div class="page1-box1">
                        <figure class="marker1"><img src="{{ asset('bundles/frontend/images/km1.jpg') }}" width="300" height="200" alt=""></figure>
                        
                            
                            <div class="clear"></div>
                        </div>
                    </div>
                    <div class="grid_8">
                        <div class="page1-box1">
                        <figure class="marker1"><img src="{{ asset('bundles/frontend/images/km2.jpg') }}" width="300" height="200" alt=""></figure>
                        
                            
                            <div class="clear"></div>
                        </div>
                    </div>
                    <div class="grid_8">
                        <div class="page1-box1">
                        <figure class="marker1"><img src="{{ asset('bundles/frontend/images/km3.gif') }}" width="300" height="200" alt=""></figure>
                        
                            
                            <div class="clear"></div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
           
                <div class="clear"></div>
                <div class="wrapper paddingHome">
                	

                	{% render "HuiFrontEndBundle:Frontend:initMenu" with {'search':0} %}
                	
                	
                	
                	<div class="grid_18">
                    	<div class="page1-box5 bg-bot">
                        <h3 class="p11">Sản phẩm xem nhiều:</h3>
						{% for sanPhamXemNhieu in sanPhamXemNhieus %}
							<div class='inner1'>
			                    <div class='inner-marker'>
									{{ loop.index }}
			                    </div>
			                    <span class='text14'>{{ sanPhamXemNhieu.thongTinSanPham.nhaSanXuat.tenNsx }}<br>{{ sanPhamXemNhieu.thongTinSanPham.tenSp }}<br></span>
{# 			                    todo: href = chung#}
			                    <figure class='page1-img2'><a href='{{ path('hui_front_end_mayanh_chi_tiet',{'id':sanPhamXemNhieu.id}) }}'><img src='{{ asset('bundles/frontend/') }}{{ sanPhamXemNhieu.thongTinSanPham.hinhAnh }}' height='81px' alt='test'></a></figure>
			                    <span class='text15'>&nbsp;</span>
			                    <span class='text16'>Giá: {{ sanPhamXemNhieu.thongTinSanPham.giaBan|number_format(0,',','.') }}  đ</span>
			                    <a class='button2' href='{{ path('hui_front_end_mayanh_chi_tiet',{'id':sanPhamXemNhieu.id}) }}'>Chi tiết</a>
			                    <div class='clear'></div>
		                    </div>
						{% endfor %}
                        </div>
                    </div>
                </div>

                  <div class="wrapper paddingHome">
                	
                    <div class="grid_24">
                    	<div class="page1-box5 bg-bot">
                        <h3 class="p11">Máy Ảnh Mới:</h3>
                        {% for mayAnhMoi in mayAnhMois %}
							<div class='inner8'>
			                    <div class='inner-marker'>
									{{ loop.index }}
			                    </div>
			                    <span class='text14'>{{ mayAnhMoi.thongTinSanPham.nhaSanXuat.tenNsx }}<br>{{ mayAnhMoi.thongTinSanPham.tenSp }}<br></span>
			                    <figure class='page1-img2'><a href='{{ path('hui_front_end_mayanh_chi_tiet',{'id':mayAnhMoi.id}) }}'><img src='{{ asset('bundles/frontend/') }}{{ mayAnhMoi.thongTinSanPham.hinhAnh }}' height='81px' alt='test'></a></figure>
			                    <span class='text15'>&nbsp;</span>
			                    <span class='text16'>Giá: {{ mayAnhMoi.thongTinSanPham.giaBan|number_format(0,',','.') }}  đ</span>
			                    <a class='button2' href='{{ path('hui_front_end_mayanh_chi_tiet',{'id':mayAnhMoi.id}) }}'>Chi tiết</a>
			                    <div class='clear'></div>
		                    </div>
						{% endfor %}
                        </div>

                    </div>
                </div>

                  <div class="wrapper paddingHome">
                	
                    <div class="grid_24">
                    	<div class="page1-box5 bg-bot">
                        <h3 class="p11">Máy Quay Mới:</h3>
                        {% for mayQuayMoi in mayQuayMois %}
							<div class='inner8'>
			                    <div class='inner-marker'>
									{{ loop.index }}
			                    </div>
			                    <span class='text14'>{{ mayQuayMoi.thongTinSanPham.nhaSanXuat.tenNsx }}<br>{{ mayQuayMoi.thongTinSanPham.tenSp }}<br></span>
			                    <figure class='page1-img2'><a href='{{ path('hui_front_end_mayquay_chi_tiet',{'id':mayQuayMoi.id}) }}'><img src='{{ asset('bundles/frontend/') }}{{ mayQuayMoi.thongTinSanPham.hinhAnh }}' height='81px' alt='test'></a></figure>
			                    <span class='text15'>&nbsp;</span>
			                    <span class='text16'>Giá: {{ mayQuayMoi.thongTinSanPham.giaBan|number_format(0,',','.') }}  đ</span>
			                    <a class='button2' href='{{ path('hui_front_end_mayquay_chi_tiet',{'id':mayQuayMoi.id}) }}'>Chi tiết</a>
			                    <div class='clear'></div>
		                    </div>
						{% endfor %}
                        </div>

                    </div>
                </div>

                 <div class="wrapper paddingHome">
                	
                    <div class="grid_24">
                    	<div class="page1-box5 bg-bot">
                        <h3 class="p11">Máy Ảnh Dưới 5 Triệu:</h3>
                        {% for mayAnhDuoi in mayAnhDuois %}
							<div class='inner8'>
			                    <div class='inner-marker'>
									{{ loop.index }}
			                    </div>
			                    <span class='text14'>{{ mayAnhDuoi.thongTinSanPham.nhaSanXuat.tenNsx }}<br>{{ mayAnhDuoi.thongTinSanPham.tenSp }}<br></span>
			                    <figure class='page1-img2'><a href='{{ path('hui_front_end_mayanh_chi_tiet',{'id':mayAnhDuoi.id}) }}'><img src='{{ asset('bundles/frontend/') }}{{ mayAnhDuoi.thongTinSanPham.hinhAnh }}' height='81px' alt='test'></a></figure>
			                    <span class='text15'>&nbsp;</span>
			                    <span class='text16'>Giá: {{ mayAnhDuoi.thongTinSanPham.giaBan|number_format(0,',','.') }}  đ</span>
			                    <a class='button2' href='{{ path('hui_front_end_mayanh_chi_tiet',{'id':mayAnhDuoi.id}) }}'>Chi tiết</a>
			                    <div class='clear'></div>
		                    </div>
						{% endfor %}
                        </div>

                    </div>
                </div>

                 <div class="wrapper paddingHome">
                	
                    <div class="grid_24">
                    	<div class="page1-box5 bg-bot">
                        <h3 class="p11">Máy Quay Phim Dưới 10 Triệu:</h3>
                        {% for mayQuayDuoi in mayQuayDuois %}
							<div class='inner8'>
			                    <div class='inner-marker'>
									{{ loop.index }}
			                    </div>
			                    <span class='text14'>{{ mayQuayDuoi.thongTinSanPham.nhaSanXuat.tenNsx }}<br>{{ mayQuayDuoi.thongTinSanPham.tenSp }}<br></span>
			                    <figure class='page1-img2'><a href='{{ path('hui_front_end_mayquay_chi_tiet',{'id':mayQuayDuoi.id}) }}'><img src='{{ asset('bundles/frontend/') }}{{ mayQuayDuoi.thongTinSanPham.hinhAnh }}' height='81px' alt='test'></a></figure>
			                    <span class='text15'>&nbsp;</span>
			                    <span class='text16'>Giá: {{ mayQuayDuoi.thongTinSanPham.giaBan|number_format(0,',','.') }}  đ</span>
			                    <a class='button2' href='{{ path('hui_front_end_mayquay_chi_tiet',{'id':mayQuayDuoi.id}) }}'>Chi tiết</a>
			                    <div class='clear'></div>
		                    </div>
						{% endfor %}
                        </div>

                    </div>
                </div>

                <div class="wrapper paddingHome">
                	     <div class="grid_18">
                         <div class="page1-box5 bg-bot">
                         <h3 class="p11">Tin tức</h3>
                	 <div class="newsticker-jcarousellite">
                	     <ul>
                	     	 {% for tinTuc in tinTucs %}
		                     <li>
			                     <div class="thumbnail">
			                     	<a href='{{ path('hui_front_end_tintuc',{'id':1}) }}'><img src='{{ asset('bundles/frontend/TinTuc/1.jpg') }}'></a>
			                     </div>
			                     <div class="info">
			                     	<a href='{{ path('hui_front_end_tintuc',{'id':1}) }}'>{{ tinTuc.getTieuDe() }}</a>
			                     	<span class="cat">{{ tinTuc.getTomTat() }}</span>
			                     </div>
			                     <div class="clear"></div>
			                     <br />
			                     <br />
		                     </li>
		                     {% endfor %}
	                     </ul>
	                 </div>
	                     <div style=" text-align:right;">
		                     <input type="button" id="btnPrev" class="prev button1 " value="<<" />
		                     <input type="button" id="btnNext" class="next button1 " value=">>" />
	                     </div>
                     </div>
                </div>
                </div>
            </div>
        </div>
    </section>
    
{% endblock %}
